package com.ddyx.generator.code.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 商品条码
 * </p>
 *
 * @author agula
 * @since 2019-08-06
 */
@TableName("p_goods_barcode")
public class GoodsBarcode extends Model<GoodsBarcode> {

    private static final long serialVersionUID=1L;

    /**
     * 唯一条码ID
     */
    @TableId(value = "barcode_id", type = IdType.AUTO)
    private Integer barcodeId;

    /**
     * SKUID
     */
    private Integer skuId;

    /**
     * 条码
     */
    private String barCode;

    /**
     * 创建时间
     */
    private LocalDateTime gmtCreate;


    public Integer getBarcodeId() {
        return barcodeId;
    }

    public void setBarcodeId(Integer barcodeId) {
        this.barcodeId = barcodeId;
    }

    public Integer getSkuId() {
        return skuId;
    }

    public void setSkuId(Integer skuId) {
        this.skuId = skuId;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Override
    protected Serializable pkVal() {
        return this.barcodeId;
    }

    @Override
    public String toString() {
        return "GoodsBarcode{" +
        "barcodeId=" + barcodeId +
        ", skuId=" + skuId +
        ", barCode=" + barCode +
        ", gmtCreate=" + gmtCreate +
        "}";
    }
}
